//
//  CustomNavBar.m

#import "CustomNavBar.h"

@implementation CustomNavBar

- (id) initWithNavController:(UINavigationController *)navController navigationItem:(UINavigationItem *)navItem {
    self = [super init];
    if (self) {
        self.navController = navController;
        self.navItem = navItem;
    }
    
    return self;
}

- (void) addLeftBarItem:(NSString *)title tg:(id)target ac:(SEL)action {
    UIBarButtonItem *barItem = [[UIBarButtonItem alloc] initWithTitle:title
                                                                style:UIBarButtonItemStyleBordered
                                                               target:target
                                                               action:action];
    self.navItem.leftBarButtonItem = barItem;
}


- (void) addRightBarItem:(NSString *)title tg:(id)target ac:(SEL)action {
    UIBarButtonItem *barItem = [[UIBarButtonItem alloc] initWithTitle:title
                                                                style:UIBarButtonItemStyleBordered
                                                               target:target
                                                               action:action];
    self.navItem.rightBarButtonItem = barItem;
}

@end
